home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Plug-In Power Pack for Netscape Communicator
/
Plug-In Power Pack for Netscape Communicator.iso
/
plugins
/
dataviews
/
include
/
dstypes.h
next >
Wrap
C/C++ Source or Header
|
1997-05-08
|
6KB
|
165 lines
/* SccsId[]= @(#)dstypes.h V1.19 3/16/95 */
/*
| file name - dstypes.h
|===================================================================
|
| copyright (c) 1991, V. I. Corporation
|
| Note: absorbed the contents of "newtypes.h"
|
|===================================================================
*/
#ifndef DSTYPESINCLUDED
#define DSTYPESINCLUDED
#include "dvfds.h"
/* datasource type flags */
#define DSPROCESS 1 /* process datasource*/
#define DSFILE 2 /* file datasource*/
#define DSCONSTANT 3 /* constant datasource*/
#define DSFUNCTION 5 /* function datasource*/
#define DSMEMORY 6 /* memory datasource*/
/*-------------------------------------------------------------------*/
/* local variable structure */
typedef struct localdata
{
struct localdata *next;
int checkf; /* flag indicating type of list element */
char *name;
struct dsgphlnk *links;/* pointer to list of fcn args that use this */
char type; /* data type - 1 of: AT_DNUM AT_TEXT AT_INUM */
/* type determines which element of union */
double dnum;
LONG inum;
char *text;
} MLOCDAT;
/* function argument structure */
typedef struct fcnargs
{
struct fcnargs *next;
int checkf; /* flag indicating type of list element */
char *argname; /* arg name, from argdesc or NULL */
V_FDS_ARG_DECL *argdesc; /* prototype descriptor */
struct fcncall *myfcn; /* ptr to "owner" function */
char type; /* arg type - one of:
AT_DSV AT_DNUM AT_TEXT AT_INUM AT_LOC
type determines which of the following
fields is currently active */
struct datsrclst *dsv;
double dnum;
char *text;
LONG inum;
MLOCDAT *locdat;
} MFCNARGS;
/* function call definition structure */
typedef struct fcncall
{
char *fcnname; /* function name - looked up in Musrsubr */
int checkf; /* flag indicating type of list element */
V_FDS_FCN_DESC *fcndesc; /* prototype descriptor */
struct mdsrc *myds; /* ptr to "owner" datasource */
ADDRESS (*fcnaddress)(); /* function pointer */
MFCNARGS *fcnargs; /* function arguments */
} MFCNCALL;
/*-------------------------------------------------------------------*/
/* This structure implements a linked list of back pointers from data
source variables back to referencing graph variables or datasource
variables */
typedef struct dsgphlnk
{
struct dsgphlnk *next;
int checkf; /* flag indicating type of list element */
char type; /* GVC_G (graph var) GVC_ARG (function argument) */
ADDRESS refptr; /* pointer to a graph variable or fcn arg */
}MGVC;
/*-------------------------------------------------------------------*/
/* Structure to define the data source variables. */
typedef struct datsrclst
{
ADDRESS datbuff; /* pointer to location of actual data */
int checkf; /* flag indicating type of list element */
struct datsrclst *next;
char *cformat; /* C format specification, i.e. "%c" */
float initval; /* initial value */
int d1; /* size in dimension 1 */
int d2; /* size in dimension 2 */
LONG bufsize; /* size of largest graph variable which points
to this structure */
LONG numbufbytes; /* Number of bytes actually allocated when
datbuff was created. */
char *name; /* variable identifier */
MGVC *refslist; /* pointer to list of graph vars, ds's or ds vars
which point to this structure */
struct mdsrc *myds; /* pointer to data source containing variable*/
char delimiter; /* delimiter character for text vars*/
DV_BOOL marked; /* DVdraw flag - set if var is marked */
MFCNCALL *fcncalls[V_FDS_FCN_MAX_TYPES]; /* function calls for fcn ds's */
ADDRESS fcndata; /* (user set)ptr to data for use by varfcn */
VOID (*freefcn)(); /* (user set)fcn to free data when dsrc closed*/
int global; /* global flag. if DSV_GLOBAL then this variable
is available for sd dynamics remapping */
}MVDS;
/*-------------------------------------------------------------------*/
/* Structure to define the data source parameters. */
typedef struct mdsrc
{
struct mdsrc *next;
int checkf; /* flag indicating type of list element */
UBYTE sstype; /* file, process, or constant */
UBYTE ssformat; /* keyed, sequential, or binary */
char *ssname;
FILE *ssinfile;
char ssiterchar,
ssvarchar,
sselemchar; /* optional seperator characters */
UBYTE ssfilestate; /* open, eof, or closed */
MVDS *ssvspclist; /* pointer to variables associated with this
data source */
struct dsl *mydsl; /* pointer to dsl in which datasource exists */
MFCNCALL *fcncalls[V_FDS_FCN_MAX_TYPES]; /* function calls for fcn ds's */
MLOCDAT *locdat; /* list of local data buffers */
DV_BOOL ssisdfltfcns; /* NO if fcns changed from default, YES else */
DV_BOOL ssisdfltname; /* NO if name changed from default, YES else */
char *fdsname; /* fcn set name (saved and restored) */
V_FDS_DESC *fdsdesc; /* fcn set descriptor (not saved) */
ADDRESS fcndata; /* (user set) ptr to data for use by fcns */
VOID (*freefcn)(); /* (user set) fcn to free data when dsrc closed */
}MDSRC;
/*-------------------------------------------------------------------*/
typedef struct dsl
{
struct mdsrc *datsrc;/* pointer to list of data sources */
int checkf;
int refcount; /* count of # of views sharing this dsl */
} MDSL;
/*-------------------------------------------------------------------*/
typedef struct mdv_s
{
LONG drawings; /* access to structures on drawings side of
data strucuture, includes graph list */
int checkf;
MDSL *dsl; /* pointer to header of data source list */
int iterations;
int delay;
char *comment; /* Comment field associated with the view */
OBJECT dynamic_dq; /* deque of dynamic objects in view */
LONG drawing_version; /* version of drawing - used to update dyn dq */
}MDV;
#endif